package com.aw.guiguzi.util

import android.app.Activity
import android.view.View
import smartdevelop.ir.eram.showcaseviewlib.GuideView
import smartdevelop.ir.eram.showcaseviewlib.config.DismissType
import smartdevelop.ir.eram.showcaseviewlib.config.Gravity
import smartdevelop.ir.eram.showcaseviewlib.listener.GuideListener

object AppCaseUtil {
    fun showCase(
        activity: Activity?,
        view: View?,
        title: String?,
        content: String?,
        listener: GuideListener?
    ) {
        GuideView.Builder(activity)
            .setTitle(title)
            .setContentText(content)
            .setGravity(Gravity.center)
            .setTargetView(view)
            .setDismissType(DismissType.selfView) //optional - default dismissible by TargetView
            .setGuideListener(listener)
            .build()
            .show()
    }
}